/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "ExpectedUeBehaviour.h"

namespace oai::udr::model {

ExpectedUeBehaviour::ExpectedUeBehaviour() {
  m_AfInstanceId = "";
  m_ReferenceId = 0;
  m_StationaryIndicationIsSet = false;
  m_CommunicationDurationTime = 0;
  m_CommunicationDurationTimeIsSet = false;
  m_ScheduledCommunicationTypeIsSet = false;
  m_PeriodicTime = 0;
  m_PeriodicTimeIsSet = false;
  m_ScheduledCommunicationTimeIsSet = false;
  m_ExpectedUmtsIsSet = false;
  m_TrafficProfileIsSet = false;
  m_BatteryIndicationIsSet = false;
  m_ValidityTime = "";
  m_ValidityTimeIsSet = false;
  m_MtcProviderInformation = "";
  m_MtcProviderInformationIsSet = false;
}

ExpectedUeBehaviour::~ExpectedUeBehaviour() {}

void ExpectedUeBehaviour::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const ExpectedUeBehaviour &o) {
  j = nlohmann::json();
  j["afInstanceId"] = o.m_AfInstanceId;
  j["referenceId"] = o.m_ReferenceId;
  if (o.stationaryIndicationIsSet())
    j["stationaryIndication"] = o.m_StationaryIndication;
  if (o.communicationDurationTimeIsSet())
    j["communicationDurationTime"] = o.m_CommunicationDurationTime;
  if (o.scheduledCommunicationTypeIsSet())
    j["scheduledCommunicationType"] = o.m_ScheduledCommunicationType;
  if (o.periodicTimeIsSet())
    j["periodicTime"] = o.m_PeriodicTime;
  if (o.scheduledCommunicationTimeIsSet())
    j["scheduledCommunicationTime"] = o.m_ScheduledCommunicationTime;
  if (o.expectedUmtsIsSet() || !o.m_ExpectedUmts.empty())
    j["expectedUmts"] = o.m_ExpectedUmts;
  if (o.trafficProfileIsSet())
    j["trafficProfile"] = o.m_TrafficProfile;
  if (o.batteryIndicationIsSet())
    j["batteryIndication"] = o.m_BatteryIndication;
  if (o.validityTimeIsSet())
    j["validityTime"] = o.m_ValidityTime;
  if (o.mtcProviderInformationIsSet())
    j["mtcProviderInformation"] = o.m_MtcProviderInformation;
}

void from_json(const nlohmann::json &j, ExpectedUeBehaviour &o) {
  j.at("afInstanceId").get_to(o.m_AfInstanceId);
  j.at("referenceId").get_to(o.m_ReferenceId);
  if (j.find("stationaryIndication") != j.end()) {
    j.at("stationaryIndication").get_to(o.m_StationaryIndication);
    o.m_StationaryIndicationIsSet = true;
  }
  if (j.find("communicationDurationTime") != j.end()) {
    j.at("communicationDurationTime").get_to(o.m_CommunicationDurationTime);
    o.m_CommunicationDurationTimeIsSet = true;
  }
  if (j.find("scheduledCommunicationType") != j.end()) {
    j.at("scheduledCommunicationType").get_to(o.m_ScheduledCommunicationType);
    o.m_ScheduledCommunicationTypeIsSet = true;
  }
  if (j.find("periodicTime") != j.end()) {
    j.at("periodicTime").get_to(o.m_PeriodicTime);
    o.m_PeriodicTimeIsSet = true;
  }
  if (j.find("scheduledCommunicationTime") != j.end()) {
    j.at("scheduledCommunicationTime").get_to(o.m_ScheduledCommunicationTime);
    o.m_ScheduledCommunicationTimeIsSet = true;
  }
  if (j.find("expectedUmts") != j.end()) {
    j.at("expectedUmts").get_to(o.m_ExpectedUmts);
    o.m_ExpectedUmtsIsSet = true;
  }
  if (j.find("trafficProfile") != j.end()) {
    j.at("trafficProfile").get_to(o.m_TrafficProfile);
    o.m_TrafficProfileIsSet = true;
  }
  if (j.find("batteryIndication") != j.end()) {
    j.at("batteryIndication").get_to(o.m_BatteryIndication);
    o.m_BatteryIndicationIsSet = true;
  }
  if (j.find("validityTime") != j.end()) {
    j.at("validityTime").get_to(o.m_ValidityTime);
    o.m_ValidityTimeIsSet = true;
  }
  if (j.find("mtcProviderInformation") != j.end()) {
    j.at("mtcProviderInformation").get_to(o.m_MtcProviderInformation);
    o.m_MtcProviderInformationIsSet = true;
  }
}

std::string ExpectedUeBehaviour::getAfInstanceId() const {
  return m_AfInstanceId;
}
void ExpectedUeBehaviour::setAfInstanceId(std::string const &value) {
  m_AfInstanceId = value;
}
int32_t ExpectedUeBehaviour::getReferenceId() const { return m_ReferenceId; }
void ExpectedUeBehaviour::setReferenceId(int32_t const value) {
  m_ReferenceId = value;
}
StationaryIndicationRm ExpectedUeBehaviour::getStationaryIndication() const {
  return m_StationaryIndication;
}
void ExpectedUeBehaviour::setStationaryIndication(
    StationaryIndicationRm const &value) {
  m_StationaryIndication = value;
  m_StationaryIndicationIsSet = true;
}
bool ExpectedUeBehaviour::stationaryIndicationIsSet() const {
  return m_StationaryIndicationIsSet;
}
void ExpectedUeBehaviour::unsetStationaryIndication() {
  m_StationaryIndicationIsSet = false;
}
int32_t ExpectedUeBehaviour::getCommunicationDurationTime() const {
  return m_CommunicationDurationTime;
}
void ExpectedUeBehaviour::setCommunicationDurationTime(int32_t const value) {
  m_CommunicationDurationTime = value;
  m_CommunicationDurationTimeIsSet = true;
}
bool ExpectedUeBehaviour::communicationDurationTimeIsSet() const {
  return m_CommunicationDurationTimeIsSet;
}
void ExpectedUeBehaviour::unsetCommunicationDurationTime() {
  m_CommunicationDurationTimeIsSet = false;
}
ScheduledCommunicationTypeRm
ExpectedUeBehaviour::getScheduledCommunicationType() const {
  return m_ScheduledCommunicationType;
}
void ExpectedUeBehaviour::setScheduledCommunicationType(
    ScheduledCommunicationTypeRm const &value) {
  m_ScheduledCommunicationType = value;
  m_ScheduledCommunicationTypeIsSet = true;
}
bool ExpectedUeBehaviour::scheduledCommunicationTypeIsSet() const {
  return m_ScheduledCommunicationTypeIsSet;
}
void ExpectedUeBehaviour::unsetScheduledCommunicationType() {
  m_ScheduledCommunicationTypeIsSet = false;
}
int32_t ExpectedUeBehaviour::getPeriodicTime() const { return m_PeriodicTime; }
void ExpectedUeBehaviour::setPeriodicTime(int32_t const value) {
  m_PeriodicTime = value;
  m_PeriodicTimeIsSet = true;
}
bool ExpectedUeBehaviour::periodicTimeIsSet() const {
  return m_PeriodicTimeIsSet;
}
void ExpectedUeBehaviour::unsetPeriodicTime() { m_PeriodicTimeIsSet = false; }
ScheduledCommunicationTimeRm
ExpectedUeBehaviour::getScheduledCommunicationTime() const {
  return m_ScheduledCommunicationTime;
}
void ExpectedUeBehaviour::setScheduledCommunicationTime(
    ScheduledCommunicationTimeRm const &value) {
  m_ScheduledCommunicationTime = value;
  m_ScheduledCommunicationTimeIsSet = true;
}
bool ExpectedUeBehaviour::scheduledCommunicationTimeIsSet() const {
  return m_ScheduledCommunicationTimeIsSet;
}
void ExpectedUeBehaviour::unsetScheduledCommunicationTime() {
  m_ScheduledCommunicationTimeIsSet = false;
}
std::vector<LocationArea> &ExpectedUeBehaviour::getExpectedUmts() {
  return m_ExpectedUmts;
}
void ExpectedUeBehaviour::setExpectedUmts(
    std::vector<LocationArea> const &value) {
  m_ExpectedUmts = value;
  m_ExpectedUmtsIsSet = true;
}
bool ExpectedUeBehaviour::expectedUmtsIsSet() const {
  return m_ExpectedUmtsIsSet;
}
void ExpectedUeBehaviour::unsetExpectedUmts() { m_ExpectedUmtsIsSet = false; }
TrafficProfileRm ExpectedUeBehaviour::getTrafficProfile() const {
  return m_TrafficProfile;
}
void ExpectedUeBehaviour::setTrafficProfile(TrafficProfileRm const &value) {
  m_TrafficProfile = value;
  m_TrafficProfileIsSet = true;
}
bool ExpectedUeBehaviour::trafficProfileIsSet() const {
  return m_TrafficProfileIsSet;
}
void ExpectedUeBehaviour::unsetTrafficProfile() {
  m_TrafficProfileIsSet = false;
}
BatteryIndicationRm ExpectedUeBehaviour::getBatteryIndication() const {
  return m_BatteryIndication;
}
void ExpectedUeBehaviour::setBatteryIndication(
    BatteryIndicationRm const &value) {
  m_BatteryIndication = value;
  m_BatteryIndicationIsSet = true;
}
bool ExpectedUeBehaviour::batteryIndicationIsSet() const {
  return m_BatteryIndicationIsSet;
}
void ExpectedUeBehaviour::unsetBatteryIndication() {
  m_BatteryIndicationIsSet = false;
}
std::string ExpectedUeBehaviour::getValidityTime() const {
  return m_ValidityTime;
}
void ExpectedUeBehaviour::setValidityTime(std::string const &value) {
  m_ValidityTime = value;
  m_ValidityTimeIsSet = true;
}
bool ExpectedUeBehaviour::validityTimeIsSet() const {
  return m_ValidityTimeIsSet;
}
void ExpectedUeBehaviour::unsetValidityTime() { m_ValidityTimeIsSet = false; }
std::string ExpectedUeBehaviour::getMtcProviderInformation() const {
  return m_MtcProviderInformation;
}
void ExpectedUeBehaviour::setMtcProviderInformation(std::string const &value) {
  m_MtcProviderInformation = value;
  m_MtcProviderInformationIsSet = true;
}
bool ExpectedUeBehaviour::mtcProviderInformationIsSet() const {
  return m_MtcProviderInformationIsSet;
}
void ExpectedUeBehaviour::unsetMtcProviderInformation() {
  m_MtcProviderInformationIsSet = false;
}

} // namespace oai::udr::model
